// 管理接口

import http from './index';

//============================ 菜单管理接口 ===============================
// 菜单管理列表
export const menulist = (params: object) => http.get('/menulist', params);
// 菜单管理详情
export const menuinfo = (params: object) => http.get('/menuinfo', params);
// 菜单管理编辑
export const menuedit = (params: object) => http.post('/menuedit', params);
// 菜单管理添加
export const menuadd = (params: object) => http.post('/menuadd', params);
// 菜单管理删除
export const menudelete = (params: object) => http.post('/menudelete', params);


//============================ 角色管理接口 ===============================
// 角色管理列表
export const roleadd = (params: object) => http.post('/roleadd', params);
// 角色管理列表
export const rolelist = () => http.get('/rolelist');
// 角色管理详情
export const roleinfo = (params: object) => http.get('/roleinfo', params);
// 角色管理修改
export const roleedit = (params: object) => http.post('/roleedit', params);
// 角色管理删除
export const roledelete = (params: object) => http.post('/roledelete', params);

//============================ 管理员接口 ===============================
// 管理员列表
export const useradd = (params: object) => http.post('/useradd', params);
// 管理员列表
export const userlist = (params: object) => http.get('/userlist', params);
// 管理员详情
export const userinfo = (params: object) => http.get('/userinfo', params);
// 管理员修改
export const useredit = (params: object) => http.post('/useredit', params);
// 管理员删除
export const userdelete = (params: object) => http.post('/userdelete', params);
// 管理员总数
export const usercount = () => http.get('/usercount');
// 管理员登录
export const userlogin = (params: object) => http.post('/userlogin', params);

//============================ 商品分类接口 ===============================
// 商品分类添加
export const cateadd = (params: object) => http.post('/cateadd', params, true)
// 商品分类列表
export const catelist = (params: object) => http.get('/catelist', params);
// 商品详情
export const cateinfo = (params: object) => http.get('/cateinfo', params);
// 商品分类修改
export const cateedit = (params: object) => http.post('/cateedit', params, true);
// 商品分类删除
export const catedelete = (params: object) => http.post('/catedelete', params);

//============================ 商品规格接口 ===============================
// 商品规格添加
export const specsadd = (params: object) => http.post('/specsadd', params);
// 商品规格总数
export const specscount = () => http.get('/specscount');
// 商品规格分页
export const specslist = (params: object) => http.get('/specslist', params);
// 商品规格详情
export const specsinfo = (params: object) => http.get('/specsinfo', params);
// 商品规格修改
export const specsedit = (params: object) => http.post('/specsedit', params);
// 商品规格删除
export const specsdelete = (params: object) => http.post('/specsdelete', params);

//============================ 商品管理接口 ===============================
// 商品管理添加
export const goodsadd = (data: any) => http.post('goodsadd', data, true)
//商品总数
export const goodscount = () => http.get('goodscount')
//商品列表
export const goodslist = (data: any) => http.get('goodslist', data)
//商品列表 单条
export const goodsinfo = (data: any) => http.get('goodsinfo', data)
//商品修改
export const goodsedit = (data: any) => http.post('goodsedit', data, true)
//商品删除
export const goodsdelete = (data: any) => http.post('goodsdelete', data)
